//
//  DayTableViewCell.m
//  TimeManager
//
//  Created by 刘凯敏 on 15/12/2016.
//  Copyright © 2016 刘凯敏. All rights reserved.
//

#import "DayTableViewCell.h"

@implementation DayTableViewCell

- (id) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if(self){
        //设置背景颜色
        self.contentView.backgroundColor = [UIColor clearColor];
        //创建一个显示时间的标签
        self.timeField = [[UILabel alloc] initWithFrame:CGRectMake(0, 15, 100, 20)];
        //设置左对齐
        self.timeField.textAlignment =NSTextAlignmentLeft;
        //设置字体大小
        self.timeField.font = [UIFont boldSystemFontOfSize:15];
        //设置文字颜色
        self.timeField.textColor = [UIColor blackColor];
        //将nameField添加到当前单元格中
        [self.contentView addSubview: self.timeField];
        //创建一个显示事件的标签
        self.detailField = [[UILabel alloc] initWithFrame:CGRectMake(150, 15, 100, 20)];
        self.detailField.textAlignment = NSTextAlignmentRight;
        self.detailField.font = [UIFont boldSystemFontOfSize:15];
        self.detailField.textColor = [UIColor blackColor];
        //将detailField添加到当前单元格中
        [self.contentView addSubview: self.detailField];
    }
    return self;
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
